<template>
  <basic-container >
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="用户配置" name="user"></el-tab-pane>
      <el-tab-pane label="角色配置" name="role"></el-tab-pane>
    </el-tabs>

    <keep-alive>
      <component :is="componentName"></component>
    </keep-alive>
  </basic-container>
</template>

<script>
import user from './user'
import role from './role'
export default {
  components: {
    user,
    role
  },
  data() {
    return {
      activeName: 'user',
      componentName: 'user'
    };
  },
  methods: {
    handleClick(value) {
      this.componentName = this.activeName
    }
  }
};
</script>
<style lang="scss" scoped>

</style>